<?php

use Faker\Generator as Faker;

/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| This directory should contain each of the model factory definitions for
| your application. Factories provide a convenient way to generate new
| model instances for testing / seeding your application's database.
|
*/

$factory->define(App\Model\User::class, function (Faker $faker) {
    return [
		'uuid' => $faker->Uuid,
        'name' => $faker->userName,
		'password' => Hash::make($faker->userName),
		'nickname' => $faker->name(),
		'phone' => $faker->phoneNumber(),  
		'avatar' => $faker->imageUrl(640, 480),   
		'role_id' => $faker->numberBetween(1,2000),
		'role_name' => $faker->name(),
		'last_at' => $faker->dateTimeBetween('-5 years','now') ,
		'last_ip' => $faker->ipv4(),
		'login_times' => $faker->numberBetween(1,2000),
		'passed' => $faker->numberBetween(0,1),
		'is_system' => 0
    ];
});